package com.ludomancy.sos64.components;

import java.awt.Graphics;
import java.awt.Point;

import com.ludomancy.gamelib.ImageAnimation;
import com.ludomancy.gamelib.ImageStrip;
import com.ludomancy.gamelib.ResourceManager;
import com.ludomancy.sos64.Component;

public class BrokenTurbine extends Component
{
	private ImageAnimation turbine;
	
	public BrokenTurbine(Point pos)
	{
		super(pos.x,pos.y);
		if(turbine == null)
		{
			turbine = new ImageAnimation(new ImageStrip(ResourceManager.getImage("broken_turbine.png"), 15, 34), 4);
		}
	}
	
	public Point getSize()
	{
		return new Point(15,34);
	}

	public void paint(Graphics g, int px, int py)
	{
		turbine.paintCurrentFrame(g, px, py);
	}
	
	public boolean isMadeOfMetal()
	{
		return true;
	}

	public void update()
	{
		turbine.update();
	}
}
